<template>
  <div>
    <van-grid :column-num="list.length">
      <van-grid-item
        @click="gridFn(item.id)"
        v-for="item in list"
        :key="item.id"
        :icon="item.icon_url"
        :text="item.name"
      />
    </van-grid>
  </div>
</template>

<script>
export default {
  name: 'gridBox',
  props: {
    list: {
      type: Array,
      required: true
    }
  },
  methods: {
    gridFn (val) {
      this.$emit('gridFn', val)
    }
  }
}
</script>

<style>
</style>
